namespace Digitalmes.Application.Mes;

/// <summary>
/// 工序信息表
/// </summary>
public sealed class ProcProcessDto : Dto
{
    /// <summary>
    /// 工序编号
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? ProcCode { get; set; }

    /// <summary>
    /// 工序名称
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? ProcName { get; set; }

    /// <summary>
    /// 产线Id
    /// </summary>
    public long LineId { get; set; }

    /// <summary>
    /// 产线编码
    /// </summary>
    public string? LineCode { get; set; }

    /// <summary>
    /// 工位Id集合
    /// </summary>
    [Required, NotNull]
    public List<long>? OpIds { get; set; }

    /// <summary>
    /// 工位编号集合
    /// </summary>
    [Required, NotNull]
    public List<string>? OpCodes { get; set; }

    /// <summary>
    /// 工艺分类（装配/检测/返工）
    /// </summary>
    public ProcClassifyEnum Classify { get; set; }

    public string? ClassifyDesc => Classify.Description();

    /// <summary>
    /// 工艺类型编号
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? ProcTypeCode { get; set; }

    /// <summary>
    /// 工艺类型名称
    /// </summary>
    [Required, NotNull]
    [StringLength(32)]
    public string? ProcTypeName { get; set; }

    /// <summary>
    /// 是否禁用
    /// </summary>
    public bool IsDisabled { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    public DateTime CreateTime { get; set; }

    /// <summary>
    /// 创建人
    /// </summary>
    public string? CreateUser { get; set; }

    /// <summary>
    /// 修改时间
    /// </summary>
    public DateTime? UpdateTime { get; set; }

    /// <summary>
    /// 修改人
    /// </summary>
    public string? UpdateUser { get; set; }
}